package kk.service;

import kk.domain.Member;

import java.util.List;

public interface MemberService {

    /**
     * 查询所有会员
     * @param pageNum
     * @param pageSize
     * @return
     */
    public List<Member> findAll(Integer pageNum,Integer pageSize) throws Exception;

    /**
     * 添加会员
     * @param member
     * @throws Exception
     */
    public void save(Member member) throws Exception;

    /**
     * 根据id查询会员
     * @param id
     * @throws Exception
     */
    public Member findById(Integer id) throws Exception;

    /**
     * 修改会员信息
     * @param member
     * @throws Exception
     */
    public void update(Member member) throws Exception;

    /**
     * 删除指定会员信息
     * @param id
     * @throws Exception
     */
    public void deleteById(Integer id) throws Exception;

    /**
     * 查询所有会员，为推荐功能使用
     * @return
     * @throws Exception
     */
    public List<Member> findAllForIntroduce() throws Exception;

    /**
     * 根据id查询出会员等级
     * @param id
     * @return
     * @throws Exception
     */
    public String findLevelById(Integer id) throws Exception;


    /**
     * 根据会员姓名模糊查询会员并分页
     * @param name
     * @param pageNum
     * @param pageSize
     * @return
     */
    public List<Member> findByName(String name,Integer pageNum,Integer pageSize) throws Exception;


}
